package com.wpam.scrabble.mobile;

import java.io.Serializable;
import java.util.ArrayList;
import com.wpam.scrabble.mobile.MovePart;
import com.wpam.scrabble.mobile.ui.GameBoard;

public class GameData implements Serializable {
	
	private static final long serialVersionUID = 1L;
	private ArrayList<MovePart> letters_;
	private ScoreBoard scoreBoard_;
	private String userLetters_;
	
	
	public GameData(GameBoard gameBoard, ScoreBoard scoreBoard, String letters) {
		
		letters_ = new ArrayList<MovePart>();
		for (int i = 0; i < 15; ++i) {
			for (int j = 0; j < 15; ++j) {
				if (gameBoard.getSquare(i, j).isAccepted())
					letters_.add(new MovePart(i, j, gameBoard.getSquare(i, j).getLetter(), 0));
			}
		}
		this.scoreBoard_ = scoreBoard;
		this.userLetters_ = letters;
	}
	
	public ArrayList<MovePart> getLetters() {
		return letters_;
	}
	
	public ScoreBoard getScoreBoard() {
		return scoreBoard_;
	}

	public String getUserLetters() {
		return userLetters_;
	}
}
